<!-- 认证页面布局组件 - 仿可汗学院风格 -->
<template>
  <div class="auth-container">
    <!-- 左侧绿色区域 -->
    <div class="left-section">
      <div class="illustration-content">
        <!-- 学校插画 -->
        <div class="school-illustration">
          <div class="building-complex">
            <!-- 主楼 -->
            <div class="main-building">
              <div class="building-base"></div>
              <div class="building-roof"></div>
              <div class="flag-pole">
                <div class="flag"></div>
              </div>
              <!-- 窗户 -->
              <div class="windows-grid">
                <div class="window" v-for="n in 9" :key="n"></div>
              </div>
              <div class="entrance"></div>
            </div>
            <!-- 左侧楼 -->
            <div class="side-building left">
              <div class="side-windows">
                <div class="window" v-for="n in 4" :key="n"></div>
              </div>
            </div>
            <!-- 右侧楼 -->
            <div class="side-building right">
              <div class="side-windows">
                <div class="window" v-for="n in 4" :key="n"></div>
              </div>
            </div>
          </div>
          <!-- 人物头像 -->
          <div class="people-avatars">
            <div class="avatar avatar-1"></div>
            <div class="avatar avatar-2"></div>
            <div class="avatar avatar-3"></div>
          </div>
        </div>
        
        <!-- 欢迎文案 -->
        <div class="welcome-text">
          <h1>加入启航，与我们一起学习</h1>
          <p>登录启航，开始您的学习之旅！</p>
          <div class="terms-text">
            登录启航即表示您同意我们的
            <a href="#">使用条款</a>和<a href="#">隐私政策</a>。
          </div>
        </div>
      </div>
    </div>
    
    <!-- 右侧登录表单区域 -->
    <div class="right-section">
      <div class="form-container">
        <slot /> <!-- 内容插槽，用于放置表单组件 -->
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 认证布局组件脚本部分
// 纯布局组件，无额外逻辑处理
</script>

<style scoped>
/* 主容器 */
.auth-container {
  min-height: 100vh;
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 左侧绿色区域 */
.left-section {
  flex: 1;
  background: linear-gradient(135deg, #3B8259 0%, #4A8A6A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: white;
}

.illustration-content {
  max-width: 500px;
  text-align: center;
}

/* 学校建筑插画 */
.school-illustration {
  position: relative;
  margin-bottom: 48px;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.building-complex {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* 主楼 */
.main-building {
  position: relative;
  width: 140px;
  height: 180px;
  z-index: 3;
}

.building-base {
  width: 100%;
  height: 160px;
  background: #E8F4E8;
  border-radius: 8px 8px 0 0;
  position: relative;
}

.building-roof {
  width: 120%;
  height: 20px;
  background: #8B4513;
  position: absolute;
  top: -10px;
  left: -10%;
  border-radius: 4px;
}

/* 旗杆和旗子 */
.flag-pole {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 30px;
  background: #8B4513;
}

.flag {
  position: absolute;
  top: 2px;
  right: 0;
  width: 20px;
  height: 12px;
  background: #FF6B6B;
  border-radius: 0 3px 3px 0;
}

/* 窗户网格 */
.windows-grid {
  position: absolute;
  top: 20px;
  left: 15px;
  right: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  height: 90px;
}

.window {
  background: #4A9EFF;
  border-radius: 2px;
  opacity: 0.8;
}

/* 入口 */
.entrance {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  background: #6B4423;
  border-radius: 12px 12px 0 0;
}

/* 侧楼 */
.side-building {
  width: 80px;
  height: 120px;
  background: #E0F0E0;
  border-radius: 6px 6px 0 0;
  position: relative;
}

.side-building.left {
  z-index: 1;
}

.side-building.right {
  z-index: 2;
}

.side-windows {
  position: absolute;
  top: 15px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  height: 60px;
}

/* 人物头像 */
.people-avatars {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.avatar {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid white;
  background-size: cover;
  background-position: center;
}

.avatar-1 {
  top: 40px;
  left: -20px;
  background: linear-gradient(135deg, #FFB74D, #FF8A65);
}

.avatar-2 {
  top: 20px;
  right: -30px;
  background: linear-gradient(135deg, #81C784, #66BB6A);
}

.avatar-3 {
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #64B5F6, #42A5F5);
}

/* 欢迎文案 */
.welcome-text h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.2;
}

.welcome-text p {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
}

.terms-text {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.5;
}

.terms-text a {
  color: white;
  text-decoration: underline;
}

/* 右侧表单区域 */
.right-section {
  flex: 0 0 480px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.form-container {
  width: 100%;
  max-width: 400px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .right-section {
    flex: 0 0 420px;
  }
  
  .welcome-text h1 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }
  
  .left-section {
    min-height: 40vh;
    padding: 30px 20px;
  }
  
  .school-illustration {
    height: 200px;
    margin-bottom: 30px;
  }
  
  .main-building {
    width: 100px;
    height: 130px;
  }
  
  .building-base {
    height: 110px;
  }
  
  .side-building {
    width: 60px;
    height: 90px;
  }
  
  .avatar {
    width: 45px;
    height: 45px;
  }
  
  .welcome-text h1 {
    font-size: 24px;
  }
  
  .welcome-text p {
    font-size: 16px;
  }
  
  .right-section {
    flex: none;
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .left-section {
    min-height: 35vh;
    padding: 20px;
  }
  
  .school-illustration {
    height: 150px;
    margin-bottom: 20px;
  }
  
  .welcome-text h1 {
    font-size: 20px;
  }
  
  .right-section {
    padding: 20px;
  }
}
</style>